@use './variables' as *;

// 动画定义
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

// 基础样式
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: $bg-secondary;
  color: $text-primary;
}

// 应用布局 - 新的窄菜单布局
.app {
  min-height: 100vh;
  background-color: $bg-secondary;
}

// 窄菜单按钮样式
.narrow-menu-button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.7);
  
  &:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
  }
  
  &.active {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
  }
}

// 消息通知小红点
.notification-dot {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  background-color: #ef4444;
  border-radius: 50%;
  font-size: 0.75rem;
}

// 响应式设计
@media (max-width: $breakpoint-lg) {
  .records-content {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
  
  .form-section .section-card {
    position: static !important;
  }
  
  .list-section {
    height: 600px !important;
  }
}

@media (max-width: $breakpoint-md) {
  // 在中等屏幕上保持窄菜单
  .narrow-menu-button {
    width: 2rem;
    height: 2rem;
  }
}

@media (max-width: $breakpoint-sm) {
  // 在小屏幕上可以考虑隐藏菜单或改为底部导航
  .narrow-sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-around;
    padding: 0.5rem;
  }
}